# -*- coding:utf-8 -*-
import os
os.environ["MAYA_TESTING_CLEANUP"] = "1"

try:
    import maya.cmds as cmds
    import pymel.core as pm
except Exception as test_ERR:
    print('test')
optimize_scene_options = [
    "nurbsSrfOption",
    "nurbsCrvOption",
    "unusedNurbsSrfOption",
    "deformerOption",
    "unusedSkinInfsOption",
    "poseOption",
    "clipOption",
    "expressionOption",
    "groupIDnOption",
    "animationCurveOption",
    "shaderOption",
    "cachedOption",
    "transformOption",
    "displayLayerOption",
    "renderLayerOption",
    "setsOption",
    "partitionOption",
    "locatorOption",
    "ptConOption",
    "pbOption",
    "snapshotOption",
    "unitConversionOption",
    "referencedOption",
    "brushOption",
    "unknownNodesOption",
    "shadingNetworksOption",
]


def _run():
    try:
        optimize_scene_options = ['displayLayerOption']
        pm.mel.scOpt_performOneCleanup(optimize_scene_options)
        del os.environ["MAYA_TESTING_CLEANUP"]

    except Exception as clear_ERR:
        print('clear_ERR:',str(clear_ERR))



def _doc():
    doc = {'name':u'清理场景','doc':'清理无用节点，显示层，渲染层'}
    return doc
